//
//  DoorSystemHomeLvingViewController.h
//  RONGAO
//
//  Created by wei wang on 2017/3/22.
//  Copyright © 2017年 wei wang. All rights reserved.
//

#import <UIKit/UIKit.h>
#ifdef LIB_140210
#define MAX_IMG_BUFFER_SIZE	(1920*1080*4)
#else
#define MAX_IMG_BUFFER_SIZE	(1920*1080*4)	//1280 * 720 * 4
#endif

#define PT_SPEED 8
#define PT_DELAY 1.5
#define ZOOM_MAX_SCALE 5.0
#define ZOOM_MIN_SCALE 1.0
#define degreeToRadians(x) (M_PI * (x) / 180.0)

#define INIT_RECORD_STATUS          0
#define WILL_RUNNING_RECORD_STATUS  1
#define RUNNING_RECORD_STATUS       2
#define WILL_COMPLETE_RECORD_STATUS 3
#define COMPLETE_RECORD_STATUS      4

#define CONTROL_VIEW_SNAPSHOT       1
#define CONTROL_VIEW_RECORD         2
#define CONTROL_VIEW_LISTEN         3
#define CONTROL_VIEW_TALK           4
#define CONTROL_VIEW_CRUISE_H       5
#define CONTROL_VIEW_CRUISE_V       6
#define CONTROL_VIEW_FLIP_H         10
#define CONTROL_VIEW_FLIP_V         11

#define VIEW_FULL_PAGE_NONE         0
#define VIEW_FULL_PAGE_FIRST        1
#define VIEW_FULL_PAGE_QUALITY      2
#define VIEW_FULL_PAGE_MORE         3

#import "DoorEventView.h"
#import "YBPopupMenu.h"
@interface DoorHomeViewController : BaseViewController<MyCameraDelegate,YBPopupMenuDelegate>{
    
    NSString *directoryPath;
#ifdef LIB_140210
    unsigned short mCodecId;
    CameraShowGLView *glView;
    CVPixelBufferPoolRef mPixelBufferPool;
    CVPixelBufferRef mPixelBuffer;
    CGSize mSizePixelBuffer;
#endif
    
}

#ifdef LIB_140210
@property (nonatomic, assign) unsigned short mCodecId;
@property (nonatomic, assign) CGSize mSizePixelBuffer;
@property (nonatomic, strong) CameraShowGLView *glView;
@property CVPixelBufferPoolRef mPixelBufferPool;
@property CVPixelBufferRef mPixelBuffer;
#endif
@property (strong, nonatomic) IBOutlet UIView *topView;

@property (strong, nonatomic) IBOutlet UIView *portraitView;
@property (weak, nonatomic) IBOutlet Monitor *monitorPortrait;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *loadingViewPortrait;

@property (strong, nonatomic) IBOutlet UIButton *openBtn;
@property (strong, nonatomic) IBOutlet UIButton *pauseBtn;
@property (strong, nonatomic) IBOutlet UIButton *closeBtn;
@property (strong, nonatomic) IBOutlet UIButton *callBtn;
@property (strong, nonatomic) IBOutlet UIButton *lockBtn;
@property (strong, nonatomic) IBOutlet UIButton *monitBtn;

/** EventView **/
@property(nonatomic,strong) DoorEventView *EventView;
@property (nonatomic, strong) YBPopupMenu *popupMenu;

- (IBAction)portraitListen:(UIButton *)sender;

- (IBAction)portraitTalk:(UIButton *)sender;

- (IBAction)talkButtonCancel:(UIButton *)sender;


@end
